// I created a new synthdef, that is a sawtooth wave which sends signals pass a bandpass filter. I also included an envolope generator, so I have more control to shape the sound. ( SynthDef(\bpfsaw, { arg atk=6, sus=0, rel=4, c1=1, c2=(-1), freq=400, detune=0.3, pan=1, cfhzmin=0.1, cfhzmax=0.3, cfmin=600, cfmax=2000, rqmin=0.1, rqmax=0.2, lsf=200, ldb=0, amp=1, out=0; var sig, env; env = EnvGen.kr(Env([0,1,1,0],[atk,sus,rel],[c1,0,c2]),doneAction:2); sig = Saw.ar(freq * {LFNoise1.kr(0.2,detune).midiratio}); sig = BPF.ar( sig, {LFNoise1.kr( LFNoise1.kr(4).exprange(cfhzmin,cfhzmax!2) ).exprange(cfmin,cfmax)!2}, {LFNoise1.kr(0.1).exprange(rqmin,rqmax)}!2 ); sig = BLowShelf.ar(sig, lsf, 0.5, ldb); sig = Balance2.ar(sig[0], sig[1], pan); sig = sig * env * amp; Out.ar(out, sig); }).add; ) // After cleaning up and adjusting the synthdef, I have created a Pbind for the band pass filter sawtooth synth to play. I've programmed an array pitches with an array of pitches, resulting in a chord progression. Randomising patterns, such as Pwhite, Pexprand, have been added to make the sound less predictable. The order in which the chords are played is generated by a pxrand function, which choose from the list randomly, but never repeats the same item twice in immediate succession. //Notably, the chords used here are all-interval tetrachords, all in a transposition that have a 'C' and 'G' in them. The Pbind has also been modified in its parameters to achieve a customised quality of sound. ( ~chords = Pbind( \instrument, \bpfsaw, \dur, Pwhite(4.5,7.0), \amp, 0.2, \attack, Pwhite(2.0, 2.5,inf), \legato, 1, \cfmin, 100, \cfmax, 1500, \rqmin, Pexprand(0.01, 0.15, inf), \detune, Pexprand (0.01, 0.15, inf), \octave, Pwhite(4, 6, inf), \rel, Pwhite(6.5, 10, inf), \midinote, Pxrand([ 60+[0, 4, 18, 7], 60+[0, 1, 3, 7], 60+[0, 10, 18, 7], 60+[0, 13, 21, 7], 60+[0, 4, 7, 18], 60+[0, 7, 15, 18], 60+[0, 7, 13, 18], 60+[0, 7, 10, -3], 60+[0, 7, -1, -8], ], inf), ); ); ~chords.play ~chords.stop; // Since every single chord from the terachord progression above has 'C' and 'G' as pedals (shown as values 0 and 7 in the list above), I wanted to highlight them with a drone in the bass. The drone is made wth a Sine wave, in stereo. I have also made a drone in the middle register. ( ~drone1 = { Pan2.ar(SinOsc.ar([65, 392], mul: Env.linen(1, 10, 360, 0.05).kr(2)))}; ~drone1.play; ~drone1.stop; ~drone2 = { Pan2.ar(SinOsc.ar([261, 261], mul: Env.linen(1, 10, 360, 0.05).kr(2)))}; ~drone2.play; ~drone2.stop; //To add to the texture, I have added a very quiet pink noise, in stereo panning, which plays with the spatialisation, and in general adds another level of complexity to the sound. ~noise = {Pan2.ar(in: PinkNoise.ar, pos: SinOsc.kr(0.01), level: 0.03)}; ~noise.play; ) //This is for the recording: s.makeWindow; s.record; s.stopRecording; //open a volume gui, and set it to minimum before starting the recording. s.volume.gui; //play this in order, one at a time, while slowly increasing the volume in the volume gui. Play for as long as needed. ~chords.play ~noise.play ~drone1.play ~done2.play //to finish, slowly and gradually slide the voulume.gui back to minimum. Once reached silence, play the following codes, or press ctrl+. (control and period). ~chords.stop ~noise.stop ~drone1.stop ~drone2.stop